package com.dt76.smallloanbackendservice.mapper.xiaohao;

import com.dt76.smallloanbackendservice.pojo.xiaohao.BorrowOrder;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface BorrowOrderMapper {
    List<BorrowOrder> qryAllOrder(@Param("start") int start,
                                  @Param("end") int end);

    //根据ID查询订单
    BorrowOrder qryByID(int id);

    //条件分页查询
    List<BorrowOrder> qryAllOrderByPage(
            @Param("start") int start,
            @Param("end") int end,
            @Param("queryName") String queryName,
            @Param("queryPhone") String queryPhone,
            @Param("startTime") String startTime,
            @Param("endTime") String endTime,
            @Param("queryType") int queryType,
            @Param("queryBoType") String queryBoType,
            @Param("queryBoTypeList") String[] queryBoTypeList);

    int qryCount();

    //条件查询分页
    int qryConditionCount(@Param("queryName") String queryName,
                          @Param("queryPhone") String queryPhone,
                          @Param("startTime") String startTime,
                          @Param("endTime") String endTime,
                          @Param("queryType") int queryType,
                          @Param("queryBoType") String queryBoType,
                          @Param("queryBoTypeList") String[] queryBoTypeList);

    ;

    int modifyBorrowOrderType(BorrowOrder borrowOrder);

    List<BorrowOrder> qryAllContract(@Param("start") int start,
                                     @Param("end") int end,
                                     @Param("queryBoId") String queryBoId,
                                     @Param("queryName") String queryName,
                                     @Param("queryContractID") String queryContractID,
                                     @Param("startTime") String startTime,
                                     @Param("endTime") String endTime,
                                     @Param("queryType") int queryType,
                                     @Param("queryBoType") String queryBoType,
                                     @Param("queryBoTypeList") String[] queryBoTypeList);

    int qryContractCount(@Param("queryBoId") String queryBoId,
                         @Param("queryName") String queryName,
                         @Param("queryContractID") String queryContractID,
                         @Param("startTime") String startTime,
                         @Param("endTime") String endTime,
                         @Param("queryType") int queryType,
                         @Param("queryBoType") String queryBoType,
                         @Param("queryBoTypeList") String[] queryBoTypeList);
}
